Grease a pan or keep a parchment paper ready.
Heat a pan with ghee.
Toast cashews if using. Set aside.
Add coconut and sugar. Mix and cook together on a medium flame.
Mixture turns gooey and bubbly.
Continue to cook until the mixture comes together and begins to leave the sides of the pan.
Pour it immediately to a greased plate, foil or butter paper. Level it well.
Quickly add the nuts and tuck them in.
Cut them to desired sizes while it is still warm.
Cool and store coconut barfi in a air tight jar.